package org.neuedu.chapter06_0622.demo01;

public class ObjectDemo01 {
    public void test() {
        System.out.println("test");
    }

    public static void main(String[] args) {
        ObjectDemo01 d = new ObjectDemo01();
        d.test();
        d.test();

        // 匿名对象 : 只能用一次
        new ObjectDemo01().test();
        ObjectDemo01 a = null;
        for (int i = 0; i < 100; i++) {
            a = new ObjectDemo01();
        }
    }
}
